<html>
<head>
<title>PFC - Vanilla Extension</title>
<style><!--
dd { margin-bottom: 1em; }
blockquote { margin: 1em; padding: 1em; border: 1px solid black; }
--></style>
</head>

<body>

<h1 id="top">PFC</h1>
<p>PFC is a Vanilla extension that integrates
<a href="http://www.phpfreechat.net/">phpFreeChat</a> with a Vanilla forum.
This is surprisingly easy thanks to the simple design of phpFreeChat. There
are no database modifications necessary, you really can just unzip and go.</p>

<h2 id="toc">Table of Contents</h2>
<ul>
<li><a href="#whatitis">What PFC Does</a></li>
<li><a href="#install">Installing and Enabling PFC</a></li>
<li><a href="#config">Configuration Settings</a></li>
<li><a href="#use">Using the Chat Room</a></li>
<li><a href="#uninstall">Uninstalling PFC</a></li>
<li><a href="#develop">Development</a></li>
</ul>

<hr />
<h2 id="whatitis">What PFC Does</h2>
<p>PFC integrates your Vanilla forum with a
<a href="http://www.phpfreechat.net/">phpFreeChat</a> chat room running on
your own server. The phpFreeChat library is a decent AJAX-based chat room that
plays quite nicely with Vanilla, even down to the look of the default theme.
phpFreeChat uses flat files for storage which makes it drop-dead easy to set
up, though it might not scale well for very busy forums. And, like any PHP
chat script, it could greatly increase the load on your server. Your mileage
may vary.</p>
<p>This version of PFC should be pretty capable but it has not been tested
much. Not only that, it relies on phpFreeChat version 1.2 which may have its
own bugs. It works for me but it might not work for you. If not, I probably
can't help. Good luck.</p>

<hr />
<h2 id="install">Installing and Enabling PFC</h2>
<p>In order for Vanilla to recognize an extension, it must be contained within
its own directory within the extensions directory. So, once you have
downloaded and unzipped the PFC files, you can then place the folder
containing the default.php file into your installation of Vanilla. The path to
PFC's default.php file should look like this:</p>
<blockquote><code>/path/to/vanilla/extensions/PFC/default.php</code></blockquote>
<p>You may also need to make the following directories world-writable (using
<code>chmod 777</code> or <code>chmod o+rw</code> or similar):</p>
<blockquote><code>/path/to/vanilla/extensions/PFC/phpfreechat-1.0-final/data/private/<br /></code></blockquote>
<p>Once this is complete, you can enable PFC through the "Manage Extensions"
form on the settings tab in Vanilla.</p>

<hr />
<h2 id="config">Configuration Settings</h2>
<p>If you haven't installed the <a href="http://lussumo.com/addons/index.php?PostBackAction=AddOn&AddOnID=386">Set
List</a> extension, I highly recommend you do so now. It's not required, but
if you install Set List you can then go to the Vanilla settings page and see
a nice, easy form for PFC settings in the panel under "Extension Options".</p>
<p>There are two parts to the PFC configuration. First, you will notice two
new permissions in your permissions list: "Use chat room" and "Chat room
administrator". Roles without "Use chat room" can not use the chat room,
obviously. Any role with the "Chat room administrator" permission can become
an admin in the chat room by using the phpFreeChat command
<code>/identify</code> with no additional password necessary.<p>
<p>If you don't use Set List, you can change the following PFC settings by
editing Vanilla's <code>conf/settings.php</code> file:</p>
<dl>
<dt><strong>$Configuration['PfcHidePanelLink']</strong></dt>
<dd><strong>Boolean</strong> (0 or 1)</dd>
<dd>If this value is '1', the link to chat in the panel will not be
displayed.</dd>
<dt><strong>$Configuration['PfcPageTitle']</strong></dt>
<dd><strong>String</strong></dd>
<dd>This will be used for the text of the chat link in your Panel. It will be
added to the name of your forum in the chat page title.</dd>
<dt><strong>$Configuration['PfcHeight']</strong></dt>
<dd><strong>Integer</strong></dd>
<dd>The height of the phpFreeChat client. 230px should fit comfortably in a
maximized Firefox browser on a 1024x768 screen.</dd>
<dt><strong>$Configuration['PfcLanguage']</strong></dt>
<dd><strong>String</strong></dd>
<dd>The language of buttons and control text in your chat client. This will
be the same for all chat users.</dd>
<dt><strong>$Configuration['PfcTheme']</strong></dt>
<dd><strong>String</strong></dd>
<dd>Customizes the look of your chat room. This will be the same for all chat
users.</dd>
<dt><strong>$Configuration['PfcChannels']</strong></dt>
<dd><strong>String</strong></dd>
<dd>The channels a user will see when first entering chat. This should be a
comma-separated list.</dd>
<dt><strong>$Configuration['PfcNotice']</strong></dt>
<dd><strong>String</strong></dd>
<dd>A notice that appears at the top of the chat page. If this string is
empty, no notice will appear.</dd>
<dt><strong>$Configuration['PfcSkipCensor']</strong></dt>
<dd><strong>Boolean</strong> (0 or 1)</dd>
<dd>If this value is "1", PFC will not try to censor bad words from chat
messages.</dd>
<dt><strong>$Configuration['PfcCensorWords']</strong></dt>
<dd><strong>String</strong></dd>
<dd>The words that will be censored. This should be a comma-separated
list. If no value is specified, the list "fuck,sex,bitch" will be used.</dd>
<dt><strong>$Configuration['PfcSkipFlood']</strong></dt>
<dd><strong>Boolean</strong> (0 or 1)</dd>
<dd>If this value is "1", PFC will not try to prevent users from flooding the
chat with too many messages.</dd>
<dt><strong>$Configuration['PfcFloodDelay']</strong></dt>
<dd><strong>Integer</strong></dd>
<dd>The number of seconds to watch for flooding. Users who send too many
messages in this time period will be kicked from the channel. If no value is
specified, the number "5" will be used.</dd>
<dt><strong>$Configuration['PfcFloodMessages']</strong></dt>
<dd><strong>Integer</strong></dd>
<dd>The maximum number of messages that can be sent during the flood delay.
If no value is specified, the number "10" will be used.</dd>
<dt><strong>$Configuration['PfcFloodCharacters']</strong></dt>
<dd><strong>Integer</strong></dd>
<dd>The maximum number of characters that can be sent during the flood delay.
If no value is specified, the number "450" will be used.</dd>
<dt><strong>$Configuration['PfcSkipLog']</strong></dt>
<dd><strong>Boolean</strong> (0 or 1)</dd>
<dd>If this value is "1", PFC will not keep a log of all messages sent in
chat.</dd>
</dl>

<hr />
<h2 id="use">Using the Chat Room</h2>
<p>After you enable PFC and give yourself the "Use chat room" permission,
you should see a "Chat Room" link appear in your panel. Click on the link
and you are chatting.</p>

<hr />
<h2 id="uninstall">Uninstalling PFC</h2>
<p>Had enough? Just disable the PFC extension in Vanilla and delete the PFC
directory from the extensions directory. That's all.</p>

<hr />
<h2 id="develop">Development</h2>
<p>PFC was written by
<a href="mailto:squirrel@digitalsquirrel.com">squirrel</a>. Updates are
available at the <a href="http://lussumo.com/addons/index.php?PostBackAction=AddOn&amp;AddOnID=308">Vanilla add-ons
site</a>. Part of the
<a href="http://code.google.com/p/vanilla-friends/">Vanilla Friends</a>
project.</p>
<p><a href="http://www.phpfreechat.net/">phpFreeChat</a> was written by
Stephane Gully &lt;stephane.gully@gmail.com&gt;</p>

</body>
</html>

